<?php
/**
 * Created by PhpStorm.
 * User: BeoBungBu
 * Date: 5/24/14
 * Time: 11:29 PM
 */
App::uses('AppController','Controller');
class LinksController extends AppController{

    public function beforeFilter() {
        parent::beforeFilter();
        if (in_array($this->action, array('add'))) {
            if(!$this->Session->check('user')){
                $this->redirect(array('controller'=>'Users','action'=>'login'));
            }
        }

    }



    public function addlink(){


        if($this->request->is('post')){
            $input=json_decode($this->request->data);
            
        }
    }
}